package cn.edu.dz.test;

import java.io.File;
import java.io.FilenameFilter;

public class MyFile implements FilenameFilter {
            @Override
            public boolean accept(File dir, String name) {
                //筛选文件以.MP4作为结尾的视频文件
                if(name.endsWith(".mp4")){
                    return  true;
                }else {
                    return false;
                }
            }

    }
